﻿using System;

namespace CK.Sprite.Form.Core
{
    [Dapper.Contrib.Extensions.Table("SpriteObjects")]
    public class SpriteObject : DesignEntityBase
    {
        /// <summary>
        /// 表名，新增后不能修改
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 业务分类
        /// </summary>
        public string Category { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public Guid Version { get; set; }

        /// <summary>
        /// 主键类型（业务系统原则都用Guid）
        /// </summary>
        public EKeyType KeyType { get; set; }

        /// <summary>
        /// 是否为树(PId,TreeCode,Path,Icon,Title)
        /// </summary>
        public bool IsTree { get; set; }

        /// <summary>
        /// 联合索引，一张表只能建一个联合索引
        /// </summary>
        public string UnionIndex { get; set; }

        /// <summary>
        /// 远程方法调用设置，格式：{fields:@fields,whereFields:@whereFields,orderInfo:@orderInfo,resultCount:@resultCount,script:@script}
        /// </summary>
        public string RemoteSelect { get; set; }

        /// <summary>
        /// 是否工作流表达(InstanceId,FlowStartTime,FlowStartUserId)
        /// </summary>
        public bool IsWorkflow { get; set; }

        /// <summary>
        /// 创建审计(新增人Id，新增时间)
        /// </summary>
        public bool CreateAudit { get; set; }

        /// <summary>
        /// 修改审计(修改人Id，修改时间)
        /// </summary>
        public bool ModifyAudit { get; set; }

        /// <summary>
        /// 删除审计(是否删除，删除人Id，删除时间)
        /// </summary>
        public bool DeleteAudit { get; set; }

        /// <summary>
        /// 属性冗余存储
        /// </summary>
        public string PropertyJsons { get; set; }
    }
}
